Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZTS: Fix zfs_mount.kshlib cleanup #10358

Merged
merged 1 commit into from
May 24, 2020
Merged

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Resolve occasional failures observed when running the ZTS zfs_mount group.

Description

Update cleanup_filesystem to use destroy_dataset when performing cleanup. This ensures the destroy is retried if the pool is busy preventing occasional failures.

How Has This Been Tested?

Locally running 20 iterations of the zfs_mount group resulted in a handful of failures caused by a zvol being busy at cleanup time. After applying this patch 100 iterations were run and no failures were observed. The logs showed that the retry code was invoked on several occasions preventing what otherwise would have been a test failure.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

Update cleanup_filesystem to use destroy_dataset when performing
cleanup.  This ensures the destroy is retried if the pool is busy
preventing occasional failures.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf behlendorf added Component: Test Suite Indicates an issue with the test framework or a test case Status: Code Review Needed Ready for review and testing labels May 22, 2020
Copy link
Member

@gmelikov gmelikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks like we need to restart tests when github stabilizes.

@codecov-commenter
Copy link

codecov-commenter commented May 23, 2020

Codecov Report

Merging #10358 into master will increase coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10358      +/-   ##
==========================================
+ Coverage   79.38%   79.53%   +0.14%     
==========================================
  Files         391      391              
  Lines      123590   123590              
==========================================
+ Hits        98114    98296     +182     
+ Misses      25476    25294     -182     
Flag Coverage Δ
#kernel 79.96% <ø> (+0.04%) ⬆️
#user 66.09% <ø> (+1.30%) ⬆️
Impacted Files Coverage Δ
cmd/zvol_id/zvol_id_main.c 76.31% <0.00%> (-5.27%) ⬇️
module/zfs/bpobj.c 86.86% <0.00%> (-4.29%) ⬇️
module/lua/lmem.c 83.33% <0.00%> (-4.17%) ⬇️
module/zcommon/zfs_fletcher.c 75.65% <0.00%> (-2.64%) ⬇️
module/os/linux/zfs/vdev_file.c 80.37% <0.00%> (-1.87%) ⬇️
module/zfs/zio.c 87.18% <0.00%> (-1.79%) ⬇️
cmd/zed/agents/fmd_api.c 88.61% <0.00%> (-1.78%) ⬇️
module/zfs/vdev_raidz.c 91.39% <0.00%> (-1.75%) ⬇️
module/zfs/btree.c 81.85% <0.00%> (-1.64%) ⬇️
lib/libzfs/libzfs_changelist.c 85.15% <0.00%> (-1.18%) ⬇️
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb82226...b68a8ea. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 24, 2020
@behlendorf behlendorf merged commit c946d5a into openzfs:master May 24, 2020
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Update cleanup_filesystem to use destroy_dataset when performing
cleanup.  This ensures the destroy is retried if the pool is busy
preventing occasional failures.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#10358
@behlendorf behlendorf deleted the zts-mount branch April 19, 2021 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants